<template>
  <div id="app">
    <h3>后台管理系统</h3>
    <el-row class="tac">
      <el-col :span="4">
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          background-color="#ccc"
          text-color="#fff"
          active-text-color="#FFF"
          router
        >
          <el-menu-item index="/">
            <i class="el-icon-menu"></i>
            <span slot="title">用户管理</span>
          </el-menu-item>
          <el-menu-item index="/about">
            <i class="el-icon-menu"></i>
            <span slot="title">商品管理</span>
          </el-menu-item>
          <el-menu-item index="/order">
            <i class="el-icon-menu"></i>
            <span slot="title">订单管理</span>
          </el-menu-item>
          <el-menu-item index="/cart">
            <i class="el-icon-menu"></i>
            <span slot="title">购物车组件效果</span>
          </el-menu-item>
        </el-menu>
      </el-col>
     <el-col :span="20">
       <router-view/>
     </el-col>
    </el-row>
    
  </div>
</template>

<style lang="scss">
*{
  padding: 0;
  margin: 0;
}
#app {
  height: 100%;
  color: #2c3e50;
}
h3{
  line-height: 50px;
  background: #545c64;
  color: #fff;
  text-align: center;
}
html,body{
  height: 100%;
}
.tac.el-row{
  height: calc(100% - 50px);
}
.el-col{
  height: 100%;
}
.el-menu{
  height: 100%!important;
}
</style>
